#pragma once
#include "TBasisStd.h"

class TFont: public TSingleton < TFont >
{
private:
	friend class TSingleton<TFont>;
public:
	ID3DX10Font*            m_pFont; 	
	ID3DX10Sprite*          m_pFontSprite;   // Sprite for batching text drawing
	ID3D10Device*			m_pd3dDevice;

public:
	HRESULT 	InitFont(ID3D10Device* m_pd3dDevice);
	RECT		GetFontRectangle(LPCWSTR text);
	bool		Release();
	bool		Init();
	bool		Draw(LPCWSTR pDrawString, RECT *rect, D3DXCOLOR pColor );
	bool		DrawSprite(	LPCWSTR pDrawString, RECT *rect, D3DXCOLOR pColor );

public:
	TFont(void);
	virtual ~TFont(void);
};
#define I_Font TFont::GetInstance()